home *** CD-ROM | disk | FTP | other *** search
- #include <stdio.h>
- #include <stdlib.h>
- #include <io.h>
- #include <fcntl.h>
-
- void main(void)
- {
- char *buf = malloc(16384);
- int handle;
- int len;
-
- printf("press a key\n");
- getch();
-
- handle = open("test.c", O_RDONLY | O_BINARY);
- len = read(handle, buf, 16384);
- printf("handle = (%u) len = (%u) errno = (%u) doserrno = (%u)\n",
- handle, len, errno, _doserrno);
- }